import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

/** 状态定义 */
const state = {
    loading: false,
    themeObj: 0,
    keywords: '',
    errorImg: 'this.onerror=null;this.src="' + require('../../static/img/tou.jpg') + '"',
    baseURL: 'http://localhost:8989/',
    //baseURL: 'http://154.8.200.181:8989/',
    hasNewMessage: false, // 将 hasNewMessage 移动到这里
};

const mutations = {
    setNewMessageStatus(state, status) {
        state.hasNewMessage = status;
    },
};

export default new Vuex.Store({
    state,
    mutations,
});
